package com.yunhe.java.Day09;

import com.yunhe.java.others.C;

import java.util.Calendar;
import java.util.Date;

/**
 * Created by Administrator on 2017/8/2 0002.
 */
public class calendar {
    public static void main(String[] args) {
        Calendar car=Calendar.getInstance();
//        car.add(Calendar.DAY_OF ;_MONTH,1000);
       car.set(2016,8,2);
        int year=car.get(Calendar.YEAR);
        int mon=car.get(Calendar.MONTH);
        int day=car.get(Calendar.DAY_OF_MONTH);
        int h= car.get(Calendar.HOUR_OF_DAY);
        int m=car.get(Calendar.MINUTE);
        int s= car.get(Calendar.SECOND);
        System.out.print(year+" ");
        System.out.print(mon+" ");
        System.out.print(day+" ");
        System.out.print(h+" ");
        System.out.print(m+" ");
        System.out.print(s+" ");

        System.out.println();
        Date d=car.getTime();
        System.out.println(d);



    }
}
